<?php
class ActionLog extends Object
{
	function __construct($arr = null)
	{
		parent::__construct($arr);
		if($this->LogType != "")
		{
			$this->RemoteAddr = $_SERVER['REMOTE_ADDR'];
			$this->AID = $_SESSION['AID'];
			$this->LogTime = time();
			if($this->Action)
				$this->Action = "\t".$this->Action;
			$content = "[".date("H:i:s")."]\t{$this->RemoteAddr}\t{$this->AID}{$this->Action}\n";
			$FileName = LOG_ROOT."".date("/Y/m/d/")."".$this->LogType.".txt";

			$log = new Cache($FileName);
			$log->Content = $content . $log->Content;

			$log->update();
		}
	}
}
?>